//
//  ViewController.h
//  ThreadTest
//
//  Created by wp w on 12-6-14.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

/*
 线程间通信:
 在应用程序主线程中做事情：
 performSelectorOnMainThread:withObject:waitUntilDone:
 performSelectorOnMainThread:withObject:waitUntilDone:modes:
 在指定线程中做事情：
 performSelector:onThread:withObject:waitUntilDone:
 performSelector:onThread:withObject:waitUntilDone:modes:
 在当前线程中做事情：
 performSelector:withObject:afterDelay:
 performSelector:withObject:afterDelay:inModes:
 取消发送给当前线程的某个消息
 cancelPreviousPerformRequestsWithTarget:
 cancelPreviousPerformRequestsWithTarget:selector:object:
 */

@interface ViewController : UIViewController{
    int tickets;
    NSCondition *ticketsCondition;
    NSOperationQueue *queue;
    
    BOOL pageStillLoading;
}

- (IBAction)threadTest;
- (IBAction)operationQueueTest;
- (IBAction)OperationTest;
- (IBAction)InvocationOperationTest;


- (IBAction)RunLoopRunTest;
@end
